home *** CD-ROM | disk | FTP | other *** search
- Path: news.spies.com!usenet
- From: Erik Max Francis <max@alcyone.com>
- Newsgroups: comp.lang.c++
- Subject: Re: [HELP] ostream inheritance Q?
- Date: Sun, 31 Mar 1996 21:10:56 -0800
- Organization: Alcyone Systems
- Message-ID: <315F6560.6DA42610@alcyone.com>
- References: <4jf4lc$t8l@ground.cs.columbia.edu>
- NNTP-Posting-Host: newton.alcyone.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i486)
-
- Hyae-Jin Oh wrote:
-
- > however, this doesn't pass through Sun Sparc 3.1 CC compiler:
- > it generates lots of warning and one error. what am i doing wrong
- > here? other than this error, all others are working correctly.
- > many thanks.
-
- The warnings: It appears that the relevant member functions are not declared
- virtual in the base class. This means that they are not virtual member
- functions, and will not override properly. (These are just warnings.)
-
- The error: You have declared an Nostream::operator << member function which
- takes an argument which is a pointer a function returning a Nostream & and
- taking a const char *. Your use of the identifier `msg' in the function
- pointer declaration is not a declaration, anymore than the identifier `msg'
- below is:
-
- Nostream &sample(const char *msg);
-
- --
- Erik Max Francis &tSftDotIotE && http://www.alcyone.com/max && max@alcyone.com
- San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
- H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
- Omnia quia sunt, lumina sunt. && Dominion, GIGO, GOOGOL, Omega, Psi, Strategem
- "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_
-